package org.thoughtworks.selenium.flex.codec;

import java.util.HashMap;
import java.util.Map;

public class ScrollDirectionFactory {
    private static final Map<String, ScrollDirection> SCROLL_DIRECTION_MAP = new HashMap<String, ScrollDirection>();

    static {
        for (ScrollDirection scrollDirection : ScrollDirection.values())
            SCROLL_DIRECTION_MAP.put(scrollDirection.value(), scrollDirection);
    }

    public static ScrollDirection get(String scrollDirection) {
        return SCROLL_DIRECTION_MAP.get(scrollDirection);
    }
}
